Skip to content

fix: respect Proxy getPrototypeOf trap in for-in iteration - #5721

Open
raghavagarwal-debug wants to merge 1 commit into
boa-dev:mainfrom
raghavagarwal-debug:fix/proxy-for-in-prototype
Open

raghavagarwal-debug wants to merge 1 commit into
boa-dev:mainfrom
raghavagarwal-debug:fix/proxy-for-in-prototype

Conversation

@raghavagarwal-debug

Copy link
Copy Markdown

Summary:

Fixes #5712 .

  • Use the internal [[GetPrototypeOf]] method when traversing the prototype chain in ForInIterator.
  • Ensure Proxy getPrototypeOf traps are invoked during for...in iteration.
  • Add a regression test verifying that properties from the prototype returned by the trap are enumerated.

Testing:

  • cargo test -p boa_engine
  • cargo fmt --check
  • git diff --check
  • cargo clippy --all-features --all-targets
  • cargo clippy --no-default-features

All tests and Clippy checks passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

for...in ignores Proxy getPrototypeOf trap

1 participant